home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / bbs / Hydra11s.lha / HBBS / Source / Test / SharedLib / mylib.c < prev    next >
C/C++ Source or Header  |  1996-06-25  |  688b  |  37 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <exec/exec.h>
  5. #include <exec/types.h>
  6.  
  7. #include <clib/exec_protos.h>
  8. #include <clib/dos_protos.h>
  9.  
  10. #include <pragmas/exec_pragmas.h>
  11. #include <pragmas/dos_pragmas.h>
  12.  
  13. #include "common.h"
  14.  
  15. struct DosLibrary *DOSBase;
  16. struct ExecBase *SysBase;
  17.  
  18. struct Grow test;
  19.  
  20. int a=0;
  21.  
  22. void * __asm __saveds LIBblurgh(register __d1 int val)
  23. {
  24.   SysBase = *(struct ExecBase **) 4L;
  25.   if (DOSBase = (struct DosLibrary *) OpenLibrary ("dos.library", 0))
  26.   {
  27.  
  28.     a++;
  29.     test.i=10+a;
  30.     strcpy(test.string,"hello!");
  31.  
  32.     Write(Output(),"moocow\n",7);
  33.     if (DOSBase) CloseLibrary ((struct Library *) DOSBase);
  34.   }
  35.   return(&test);
  36. }
  37.